#ifndef _I_MAP_H_
#define _I_MAP_H_
#define MAP_MAX 10
#include <gtk/gtk.h>

typedef struct complex{
    int id[MAP_MAX];
    GtkWidget * id_label[MAP_MAX];
    GtkWidget * id_num[MAP_MAX];
    GtkWidget * textview[MAP_MAX];
    GtkWidget * window[MAP_MAX];
    GThread * thread[MAP_MAX];
}Map;
void init_map(Map * map);

void add_map_first(Map * map,int id, GtkWidget * id_label,GtkWidget * id_num);

void add_map_again(Map * map,int id, GtkWidget * window,GtkWidget * textview,GThread * thread);

GtkWidget *  id_to_idlabel(Map *map,int id);
int idlabel_to_id(Map *map, GtkWidget * id_label);

GtkWidget *  id_to_idnum(Map *map,int id);
int idnum_to_id(Map *map,GtkWidget * id_num);

GtkWidget *  id_to_window(Map *map,int id);
int window_to_id(Map *map, GtkWidget * window);

GtkWidget *  id_to_textview(Map *map,int id);
int textview_to_id(Map *map,GtkWidget * textview);

GThread * id_to_thread(Map *map, int id);
int thread_to_id(Map *map,GThread *thread);

void dele_id_map(Map *map,int id);

#endif
